<?php

/**
 * UsuarioEmpreendimento form base class.
 *
 * @package    form
 * @subpackage usuario_empreendimento
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseUsuarioEmpreendimentoForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_usuario_empreendimento' => new sfWidgetFormInputHidden(),
      'tp_local_atividade'        => new sfWidgetFormInput(),
      'ds_local_atividade'        => new sfWidgetFormInput(),
      'ds_contrato_atividade'     => new sfWidgetFormInput(),
      'tp_ponto'                  => new sfWidgetFormInput(),
      'tp_atividade'              => new sfWidgetFormInput(),
      'tp_empresa'                => new sfWidgetFormInput(),
      'tp_estrutura'              => new sfWidgetFormInput(),
      'tp_controle_formal'        => new sfWidgetFormInput(),
      'ds_sistema'                => new sfWidgetFormTextarea(),
      'id_dados_usuario'          => new sfWidgetFormDoctrineChoice(array('model' => 'DadosUsuario', 'add_empty' => false)),
      'created_at'                => new sfWidgetFormDateTime(),
      'updated_at'                => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id_usuario_empreendimento' => new sfValidatorDoctrineChoice(array('model' => 'UsuarioEmpreendimento', 'column' => 'id_usuario_empreendimento', 'required' => false)),
      'tp_local_atividade'        => new sfValidatorString(array('max_length' => 1)),
      'ds_local_atividade'        => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'ds_contrato_atividade'     => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'tp_ponto'                  => new sfValidatorString(array('max_length' => 1, 'required' => false)),
      'tp_atividade'              => new sfValidatorString(array('max_length' => 1, 'required' => false)),
      'tp_empresa'                => new sfValidatorString(array('max_length' => 1, 'required' => false)),
      'tp_estrutura'              => new sfValidatorString(array('max_length' => 1, 'required' => false)),
      'tp_controle_formal'        => new sfValidatorString(array('max_length' => 1, 'required' => false)),
      'ds_sistema'                => new sfValidatorString(array('required' => false)),
      'id_dados_usuario'          => new sfValidatorDoctrineChoice(array('model' => 'DadosUsuario')),
      'created_at'                => new sfValidatorDateTime(array('required' => false)),
      'updated_at'                => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('usuario_empreendimento[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'UsuarioEmpreendimento';
  }

}
